<script setup lang="js">

import {onMounted, ref} from "vue";
import request from "@/utils/httpRequest.ts";

const reviewList = ref([]);

function loadingReviewData(){
  request.get('/task/review/my').then(res =>{
    if (res.code === 2000){
      reviewList.value = res.data;
    }
  })
}

onMounted(()=>{
  loadingReviewData();
})
</script>

<template>
<div v-for="review in reviewList">
  <el-descriptions :title="`收到【${review.task.title}】任务的评价`" style="margin-top: 2rem;overflow-y: auto" border>
    <el-descriptions-item
        :rowspan="6"
        :width="140"
        label="任务图片"
        align="center"
    >
      <el-image
          style="width: 100px; height: 100px"
          :src="review.task.imageUrl"
      />
    </el-descriptions-item>
    <el-descriptions-item label="评价">{{ review.comment }}</el-descriptions-item>
  </el-descriptions>
</div>
</template>

<style scoped>

</style>